package cn.lijia.itrip.service;
import cn.lijia.itrip.common.Page;
import cn.lijia.itrip.model.ItripUser;

import java.util.HashMap;
import java.util.List;
import java.util.Map;



public interface ItripUserService {

    public ItripUser getById(Long id)throws Exception;

    public List<ItripUser>	getListByMap(Map<String, Object> param)throws Exception;

    public Integer getCountByMap(Map<String, Object> param)throws Exception;

    public Integer save(ItripUser itripUser)throws Exception;

    public Integer modify(ItripUser itripUser)throws Exception;

    public Integer removeById(Long id)throws Exception;

    public Page<List<ItripUser>> queryPageByMap(Map<String, Object> param, Integer pageNo, Integer pageSize)throws Exception;

    /**
     * 用户登录
     * @param userCode 第三方账号
     * @param userPassword 用户密码
     * @return 根据userCode和userPassword去匹配对应的用户并返回
     * @throws Exception 如果没有匹配到用户，则抛出异常提示信息
     */
    public ItripUser login(String userCode,String userPassword) throws Exception;

    /**
     * 根据userCode查询对应的用户
     * @param userCode 第三方账号
     * @return 如果查询到则返回对应的用户，否则返回null
     * @throws Exception
     */
    public ItripUser findByUserCode(String userCode) throws Exception;

    /**
     * 手机短信验证
     * @param phone 手机号码
     * @return
     */
    public HashMap SDKSendTemplateSMS(String phone);


}
